﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CBMS.Interfaces;
using CBMS.Models;
using System.Data.Objects.DataClasses;
using System.Data.Objects;
using System.Collections;
using CBMS.Objects;
using System.Data.Objects.SqlClient;
using CBMS.Common;
using System.Data.Common;
using System.Data.EntityClient;
using System.Data;
using System.Globalization;

namespace CBMS.Business
{
    public class CountryRepository : BaseEntityRepository<Country>, ICountryRepository
    {
        public CountryRepository()
            : base()
        {

        }
        public IList<Country> GetAll()
        {
            IList<Country> lstResult = new List<Country>();
            try
            {
                lstResult= (from n in DbContext.Countries
                           where n.is_active==true
                           select n
                           ).ToList<Country>();
                
                return lstResult;
            }
            catch
            {
                return new List<Country>();
            }
        }
    }
}